<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="if (top.frames['componentsframe'] == undefined) { s = window.location.toString(); window.location = 'index.html?p=' + s.substring(s.lastIndexOf('/')+1); }">
<h2 class="comptitle">Simple Module <i>TestApplication</i></h2>
<b>Package:</b> org.mixim.modules.application<br/><b>File: <a href="src-modules-application-TestApplication.ned.html">src/modules/application/TestApplication.ned</a></b><br/><p><a href="../doxy/a00207.html" target="mainframe"><b>C++ definition</b></a></p>
<p>(no description)</p><img src="org.mixim.modules.application.TestApplication-type.png" ismap="yes" usemap="#type-diagram"/><map name="type-diagram">
<area shape="rect" href="org.mixim.modules.application.TestApplication.html" title="TestApplication" alt="TestApplication" coords="0,30,129,70">
</map>
<h3 class="subtitle">Usage diagram:</h3>
<p>The following diagram shows usage relationships between types.
Unresolved types are missing from the diagram. Click <a href="full-ned-usage-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.modules.application.TestApplication-usage.png" ismap="yes" usemap="#usage-diagram"/><map name="usage-diagram"><area shape="rect" href="org.mixim.modules.application.TestApplication.html" title="Simple Module TestApplication" alt="TestApplication" coords="7,16,105,40">
</map>
<h3 class="subtitle">Inheritance diagram:</h3>
<p>The following diagram shows inheritance relationships for this type.
Unresolved types are missing from the diagram. Click <a href="full-ned-inheritance-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.modules.application.TestApplication-inheritance.png" ismap="yes" usemap="#inheritance-diagram"/><map name="inheritance-diagram"><area shape="rect" href="org.mixim.modules.application.TestApplication.html" title="Simple Module TestApplication" alt="TestApplication" coords="8,88,107,112">
<area shape="rect" href="org.mixim.base.modules.IBaseApplLayer.html" title="Module Interface IBaseApplLayer" alt="IBaseApplLayer" coords="7,16,108,40">
</map>
<h3 class="subtitle">Parameters:</h3>
<table class="paramstable">
   <tr>
      <th class="name">Name</th>
      <th class="type">Type</th>
      <th class="defaultvalue">Default value</th>
      <th class="description">Description</th>
   </tr>
<tr class="local">
   <td>debug</td>
   <td>
      <i>bool</i>
   </td>
   <td>false</td>
   <td>
<p>debug switch</p>
   </td>
</tr>
<tr class="local">
   <td>stats</td>
   <td>
      <i>bool</i>
   </td>
   <td>false</td>
   <td>
<p>stats switch</p>
   </td>
</tr>
<tr class="local">
   <td>trace</td>
   <td>
      <i>bool</i>
   </td>
   <td>false</td>
   <td>
<p>trace switch</p>
   </td>
</tr>
<tr class="local">
   <td>trafficParam</td>
   <td>
      <i>double</i>
   </td>
   <td></td>
   <td>
<p>mean time between packets (poisson arrival rate)</p>
   </td>
</tr>
<tr class="local">
   <td>nodeAddr</td>
   <td>
      <i>double</i>
   </td>
   <td></td>
   <td>
<p>node address</p>
   </td>
</tr>
<tr class="local">
   <td>dstAddr</td>
   <td>
      <i>double</i>
   </td>
   <td></td>
   <td>
<p>packet destination node address</p>
   </td>
</tr>
<tr class="local">
   <td>flood</td>
   <td>
      <i>bool</i>
   </td>
   <td></td>
   <td>
<p>send packets continuously</p>
   </td>
</tr>
<tr class="local">
   <td>payloadSize</td>
   <td>
      <i>double</i>
   </td>
   <td></td>
   <td>
<p>number of bytes per packet</p>
   </td>
</tr>
<tr class="local">
   <td>nbPackets</td>
   <td>
      <i>double</i>
   </td>
   <td></td>
   <td>
<p>number of packets to generate</p>
   </td>
</tr>
<tr class="local">
   <td>headerLength</td>
   <td>
      <i>int</i>
   </td>
   <td></td>
   <td>
<p>length of the application message header (in bits)</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Gates:</h3>
<table class="gatestable">
   <tr>
      <th class="name">Name</th>
      <th class="type">Direction</th>
      <th class="gatesize">Size</th>
      <th class="description">Description</th>
   </tr>
<tr class="local">
   <td>lowerLayerIn</xsl:if></td>
   <td><i>input</i></td>
   <td></td>   <td>
<p>to receive data from communications stack</p>
</td>
</tr>
<tr class="local">
   <td>lowerLayerOut</xsl:if></td>
   <td><i>output</i></td>
   <td></td>   <td>
<p>to send data to communications stack</p>
</td>
</tr>
<tr class="local">
   <td>lowerControlIn</xsl:if></td>
   <td><i>input</i></td>
   <td></td>   <td>
<p>to receive control messages from communications stack</p>
</td>
</tr>
<tr class="local">
   <td>lowerControlOut</xsl:if></td>
   <td><i>output</i></td>
   <td></td>   <td>
<p>to send  control messages from communications stack</p>
</td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #800000; font-weight: bold; ">simple</span><span style="color: #000000; "> </span><span style="color: #000000; ">TestApplication</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">like</span><span style="color: #000000; "> </span><span style="color: #000000; ">IBaseApplLayer</span><span style="color: #000000; ">
{
    </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">debug</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">false</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// debug switch
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">stats</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">false</span><span style="color: #000000; ">);   </span><span style="color: #808080; font-style: italic; ">// stats switch
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">trace</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">false</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// trace switch
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">trafficParam</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">s</span><span style="color: #000000; ">);   </span><span style="color: #808080; font-style: italic; ">// mean time between packets (poisson arrival rate)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">nodeAddr</span><span style="color: #000000; ">;        </span><span style="color: #808080; font-style: italic; ">// node address
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">dstAddr</span><span style="color: #000000; ">;		</span><span style="color: #808080; font-style: italic; ">// packet destination node address
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">bool</span><span style="color: #000000; "> </span><span style="color: #000000; ">flood</span><span style="color: #000000; ">;                   </span><span style="color: #808080; font-style: italic; ">// send packets continuously
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">payloadSize</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">byte</span><span style="color: #000000; ">);     </span><span style="color: #808080; font-style: italic; ">// number of bytes per packet
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">nbPackets</span><span style="color: #000000; ">;	</span><span style="color: #808080; font-style: italic; ">// number of packets to generate
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">headerLength</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;bit&quot;</span><span style="color: #000000; ">);   </span><span style="color: #808080; font-style: italic; ">// length of the application message header (in bits)
</span><span style="color: #000000; ">
    </span><span style="color: #800000; font-weight: bold; ">gates</span><span style="color: #000000; ">:
        </span><span style="color: #000080; font-weight: bold; ">input</span><span style="color: #000000; "> </span><span style="color: #000000; ">lowerLayerIn</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// to receive data from communications stack
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">output</span><span style="color: #000000; "> </span><span style="color: #000000; ">lowerLayerOut</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// to send data to communications stack
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">input</span><span style="color: #000000; "> </span><span style="color: #000000; ">lowerControlIn</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// to receive control messages from communications stack
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">output</span><span style="color: #000000; "> </span><span style="color: #000000; ">lowerControlOut</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// to send  control messages from communications stack
</span><span style="color: #000000; ">
}
</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
